package com.bsoft.gol.hcs.satisfaction.entity;

import javax.persistence.*;
import java.util.Date;

/**
 * Created by ChenJij on 2020/12/15.
 */
@Entity
@Table(name = "surgical_type")
public class SurgicalType {
    private String surgicalTypeId;
    private String orgId;
    private String orgSurgicalTypeId;
    private String surgicalTypeCode;
    private String surgicalTypeName;
    private String surgicalLevel;
    private String pinyinCode;
    private String deleteFlag;
    private Date deleteDt;
    private String deleteUser;

    @Id
    @Column(name = "surgical_type_id")
    public String getSurgicalTypeId() {
        return surgicalTypeId;
    }

    public void setSurgicalTypeId(String surgicalTypeId) {
        this.surgicalTypeId = surgicalTypeId;
    }

    @Basic
    @Column(name = "org_id")
    public String getOrgId() {
        return orgId;
    }

    public void setOrgId(String orgId) {
        this.orgId = orgId;
    }

    @Basic
    @Column(name = "org_surgical_type_id")
    public String getOrgSurgicalTypeId() {
        return orgSurgicalTypeId;
    }

    public void setOrgSurgicalTypeId(String orgSurgicalTypeId) {
        this.orgSurgicalTypeId = orgSurgicalTypeId;
    }

    @Basic
    @Column(name = "surgical_type_code")
    public String getSurgicalTypeCode() {
        return surgicalTypeCode;
    }

    public void setSurgicalTypeCode(String surgicalTypeCode) {
        this.surgicalTypeCode = surgicalTypeCode;
    }

    @Basic
    @Column(name = "surgical_type_name")
    public String getSurgicalTypeName() {
        return surgicalTypeName;
    }

    public void setSurgicalTypeName(String surgicalTypeName) {
        this.surgicalTypeName = surgicalTypeName;
    }

    @Basic
    @Column(name = "surgical_level")
    public String getSurgicalLevel() {
        return surgicalLevel;
    }

    public void setSurgicalLevel(String surgicalLevel) {
        this.surgicalLevel = surgicalLevel;
    }

    @Basic
    @Column(name = "pinyin_code")
    public String getPinyinCode() {
        return pinyinCode;
    }

    public void setPinyinCode(String pinyinCode) {
        this.pinyinCode = pinyinCode;
    }

    @Basic
    @Column(name = "delete_flag")
    public String getDeleteFlag() {
        return deleteFlag;
    }

    public void setDeleteFlag(String deleteFlag) {
        this.deleteFlag = deleteFlag;
    }

    @Basic
    @Column(name = "delete_dt")
    public Date getDeleteDt() {
        return deleteDt;
    }

    public void setDeleteDt(Date deleteDt) {
        this.deleteDt = deleteDt;
    }

    @Basic
    @Column(name = "delete_user")
    public String getDeleteUser() {
        return deleteUser;
    }

    public void setDeleteUser(String deleteUser) {
        this.deleteUser = deleteUser;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        SurgicalType that = (SurgicalType) o;

        if (surgicalTypeId != null ? !surgicalTypeId.equals(that.surgicalTypeId) : that.surgicalTypeId != null) {
            return false;
        }
        if (orgId != null ? !orgId.equals(that.orgId) : that.orgId != null) {
            return false;
        }
        if (orgSurgicalTypeId != null ? !orgSurgicalTypeId.equals(that.orgSurgicalTypeId) : that.orgSurgicalTypeId != null) {
            return false;
        }
        if (surgicalTypeCode != null ? !surgicalTypeCode.equals(that.surgicalTypeCode) : that.surgicalTypeCode != null) {
            return false;
        }
        if (surgicalTypeName != null ? !surgicalTypeName.equals(that.surgicalTypeName) : that.surgicalTypeName != null) {
            return false;
        }
        if (surgicalLevel != null ? !surgicalLevel.equals(that.surgicalLevel) : that.surgicalLevel != null) {
            return false;
        }
        if (pinyinCode != null ? !pinyinCode.equals(that.pinyinCode) : that.pinyinCode != null) {
            return false;
        }
        if (deleteFlag != null ? !deleteFlag.equals(that.deleteFlag) : that.deleteFlag != null) {
            return false;
        }
        if (deleteDt != null ? !deleteDt.equals(that.deleteDt) : that.deleteDt != null) {
            return false;
        }
        if (deleteUser != null ? !deleteUser.equals(that.deleteUser) : that.deleteUser != null) {
            return false;
        }

        return true;
    }

    @Override
    public int hashCode() {
        int result = surgicalTypeId != null ? surgicalTypeId.hashCode() : 0;
        result = 31 * result + (orgId != null ? orgId.hashCode() : 0);
        result = 31 * result + (orgSurgicalTypeId != null ? orgSurgicalTypeId.hashCode() : 0);
        result = 31 * result + (surgicalTypeCode != null ? surgicalTypeCode.hashCode() : 0);
        result = 31 * result + (surgicalTypeName != null ? surgicalTypeName.hashCode() : 0);
        result = 31 * result + (surgicalLevel != null ? surgicalLevel.hashCode() : 0);
        result = 31 * result + (pinyinCode != null ? pinyinCode.hashCode() : 0);
        result = 31 * result + (deleteFlag != null ? deleteFlag.hashCode() : 0);
        result = 31 * result + (deleteDt != null ? deleteDt.hashCode() : 0);
        result = 31 * result + (deleteUser != null ? deleteUser.hashCode() : 0);
        return result;
    }
}